<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <title>运行检测系统-子链管理-子链合约-子链合约详情</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link rel="stylesheet" href="/css/style.css" />
    <link rel="stylesheet" href="/css/iconfont.css" />
    <link rel="stylesheet" href="/css/element-icons.css" />
    <link rel="stylesheet" href="/css/newiconfont.css" />
    <script src="/js/jquery.min.js"></script>
    <script src="/js/lib.js"></script>
    <!--[if lt IE 9]>
        <script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!--[if IE]>
        <link rel="stylesheet" href="/css/all-ie-only.css" />
    <![endif]-->
    <style>
        .data-content {height: 100px;margin-top: 20px;}
    </style>
</head>

<body>
    <div class="header">
        <a href="javascript:;" class="header-logo">
            <img src="/images/logo.png" alt="" />
        </a>
        <div class="header-nav">
            <ul class="fix">
                <li>
                    <a href="javascript:;" class="v1">标识注册系统</a>
                </li>
                <li>
                    <a href="javascript:;" class="v1">标识解析系统</a>
                </li>
                <li>
                    <a href="javascript:;" class="v1">统一认证系统</a>
                </li>
                <li>
                    <a href="javascript:;" class="v1">运行检测系统</a>
                </li>
                <li>
                    <a href="javascript:;" class="v1">区块链浏览器</a>
                </li>
                <li>
                    <a href="javascript:;" class="v1">链网展示系统</a>
                </li>
            </ul>
        </div>
        <div class="header-user">
            <a href="javascript:;" class="hd">
                <img src="/images/head.png" alt="" />
                <span>管理员</span>
            </a>
            <div class="dropdown-menu">
                <div class="icon-arrow"></div>
                <ul>
                    <li class="wrz">
                        <a href="javascript:;" class="con">
                            <span>未认证</span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:;" class="con">
                            <span>首页</span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:;" class="con">
                            <span>资料编辑</span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:;" class="con">
                            <span>我的钱包</span>
                        </a>
                    </li>
                    <li>
                       <a onclick="logout()" class="con">
                            <span>退出</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="block-contail">
        <!-- 布局-侧边 -->
        <div class="block-left">
            <div class="block-scrollbar">
                <!-- 收起、展开按钮 -->
                <div class="arrow-btn">
                    <span class="el-icon-arrow-left"></span>
                </div>
                <!-- 收起、展开按钮 end -->
                <!-- 侧边导航 -->
                <ul class="slide-nav">
                    <li>
                        <a href="javascript:;" class="v1">
                            <i class="icon_dn icon newiconfont newicon1-guganlianguanli"></i>
                            <span class="title">骨干链管理</span>
                            <i class="icon-arrow el-icon-arrow-down"></i>
                        </a>
                        <div class="slide-nav-subitem">
                            <ul>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">基础配置</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">节点管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">合约管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">用户管理</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:;" class="v1">
                            <i class="icon_dn icon newiconfont newicon2-zilianguanli"></i>
                            <span class="title">子链管理</span>
                            <i class="icon-arrow el-icon-arrow-down"></i>
                        </a>
                        <div class="slide-nav-subitem">
                            <ul>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">子链申报管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">子链区块头</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">子链节点管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">子链用户管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">子链合约管理</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:;" class="v1">
                            <i class="icon_dn icon newiconfont newicon3-renzhengzhongxin"></i>
                            <span class="title">认证中心</span>
                            <i class="icon-arrow el-icon-arrow-down"></i>
                        </a>
                        <div class="slide-nav-subitem">
                            <ul>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">个人认证</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">企业认证</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">节点认证</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:;" class="v1">
                            <i class="icon_dn icon newiconfont newicon6-quanxianguanli"></i>
                            <span class="title">权限管理</span>
                            <i class="icon-arrow el-icon-arrow-down"></i>
                        </a>
                        <div class="slide-nav-subitem">
                            <ul>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">角色管理</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:;" class="v1">
                            <i class="icon_dn icon iconfont iconicon_setting"></i>
                            <span class="title">系统管理</span>
                            <i class="icon-arrow el-icon-arrow-down"></i>
                        </a>
                        <div class="slide-nav-subitem">
                            <ul>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">用户管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">系统字典</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">业务字典</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" class="v2">
                                        <span class="title">菜单管理</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
                <!-- 侧边导航 end -->
            </div>
        </div>
        <!-- 布局-侧边 end -->
        <!-- 布局-主内容 -->
        <div class="block-main">
            <div class="block-scrollbar">
                <!-- 主内容 -->
                <div class="cur">
                    <a href="javascript:;">子链管理</a><em>/</em>
                    <a href="javascript:;">子链合约</a><em>/</em>
                    <span>子链合约详情</span>
                </div>
                <div class="block-1">
                    <div class="block1-cont">
                        <div class="content-2">
                            <div class="content-title">
                                <h3>基本信息</h3>
                            </div>
                            <div class="form-1 form-2">
                                <div class="form-item col-1">
                                    <div class="tit">合约地址：</div>
                                    <div class="con js_copyInfo">
                                        <em id="address"></em>
                                        <!--<i class="el-icon-copy-document" style="margin-left: 90%;">复制</i>-->
                                    </div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">合约名称：</div>
                                    <div class="con" id="name"></div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">所属子链：</div>
                                    <div class="con" id="chainName"></div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">合约类型：</div>
                                    <div class="con" id="type">系统合约</div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">合约状态：</div>
                                    <div class="con" id="status">启用</div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">总调用次数：</div>
                                    <div class="con" id="totalCall"></div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">近7天调用次数：</div>
                                    <div class="con" id="day7Call"></div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">创建用户BID：</div>
                                    <div class="con" id="ownerBid"></div>
                                </div>
                                <div class="form-item col-1">
                                    <div class="tit">创建时间:</div>
                                    <div class="con" id="createTime"></div>
                                </div>
                            </div>
                        </div>
                        <div class="tabrel01 js-tabs js-anim" data-modulename="tabrel01">
                            <ul class="tabrel01-tit">
                                <li class="first tabrel01-item tabrel01-item__on"><span class="subitem">交易</span></li>
                                <li class="tabrel01-item"><span class="subitem">字节码</span></li>
                                <li class="last tabrel01-item"><span class="subitem">ABI</span></li>
                            </ul>
                            <div class="tabrel01-desc">
                                <div class="tabrel01-item tabrel01-item__on">
                                    <div class="data-content  table-scroll-x">
                                        <div class="table1-head table-1">
                                            <table>
                                                <colgroup>
                                                    <col name="" width="233">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                </colgroup>
                                                <thead>
                                                <tr>
                                                    <th>交易哈希</th>
                                                    <th>状态</th>
                                                    <th>区块高度</th>
                                                    <th>调用者</th>
                                                    <th>交易总额</th>
                                                    <th>交易时间</th>
                                                </tr>
                                                </thead>
                                            </table>
                                        </div>
                                        <div class="table1-body table-1">
                                            <table>
                                                <colgroup>
                                                    <col name="" width="233">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="231">
                                                    <col name="" width="200">
                                                </colgroup>
                                            </table>
                                            <div class="none-data">
                                                <p>暂无数据</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tabrel01-item">
                                    <div class="data-content  table-scroll-x" id="byteCode_content"></div>
                                </div>
                                <div class="tabrel01-item">
                                    <div class="data-content  table-scroll-x" id="abi_content"></div>
                                </div>
                            </div>
                        </div>
                        <div class="set-bt2">
                            <a href="/monitor/zilian/contract.html" class="primary-btn">
                                <span>返回</span>
                            </a>
                        </div>
                    </div>
                </div>
                <!-- 主内容 end -->
            </div>
        </div>
        <!-- 布局-主内容 end -->
    </div>
    <script src="/js/module.js"></script>
    <script src="../../js/common/commonPage.js"></script>
    <script>
        var address = getUrlParams('address');
        function getDetail() {
            $request({
                url: '/GT_API/blade-DWHCMS/api/bifSubContract/getDetail?address=' + address,
                method: 'post'
            }, function (res) {
                var detail = res;
                $('#address').html(detail.address);
                $('#name').html(detail.name);
                $('#chainName').html(detail.chainName);
                $('#totalCall').html(detail.totalCall);
                $('#day7Call').html(detail.day7Call);
                $('#day7Call').html(detail.day7Call);
                $('#ownerBid').html(detail.ownerBid);
                $('#createTime').html(detail.createTime);
                $('#createTime').html(detail.createTime);
                $("#byteCode_content").html(detail.byteCode == "" ? "---" : detail.byteCode);
                $("#abi_content").html(detail.abi == "" ? "---" : detail.abi);
            });
        }
        function getTable() {
            $request({
                url: '/GT_API/blade-DWHCMS/api/tx/listBySubContractAddress?subContractAddress=' + address + 'current=' + currentPage + '&size=' + currentSize,
                method: 'post'
            }, function (res) {
                var list = res.records;
                if (list.length) {
                    $('#table').children().remove();
                    // 字段因为没数据，需要在对齐下
                    $.each(list, function(i, x){
                        template += "<tr class='table1'>" +
                            "<td>" + (i + 1) + "</td>" +
                            "<td>" + x.hash + "</td>" +
                            "<td>" + x.bid + "</td>" +
                            "<td>" + x.type + "</td>" +
                            "<td>" + x.user + "</td>" +
                            "<td>" + x.address + "</td>" +
                            "<td>" + x.money + "</td>" +
                            "<td>" + x.createTime + "</td>" +
                            "<td>" +
                            "</tr>"
                    });
                } else {
                    template = "<div class='none-data2'><p>暂无数据</p></div>";
                }
            });
        }
        getDetail();
        getTable();
    </script>
</body>

</html>